import request from '@/utils/request'

export function save_file_infos(data) {
    return request({
        url: '/mall_biz/attach_file',
        method: 'post',
        data
    })
}

export function file_page(params) {
    return request({
        url: '/mall_biz/attach_file/page',
        method: 'get',
        params
    })
}

export function update_file_name(data) {
    return request({
        url: '/mall_biz/attach_file',
        method: 'put',
        data
    })
}

export function file_del(id) {
    return request({
        url: `/mall_biz/attach_file/${id}`,
        method: 'delete'
    })
}
export function file_del_batch(data) {
    return request({
        url: `/mall_biz/attach_file`,
        method: 'delete',
        data
    })
}



export function save_file_group(data) {
    return request({
        url: '/mall_biz/attach_file_group',
        method: 'post',
        data
    })
}

export function file_group_list() {
    return request({
        url: '/mall_biz/attach_file_group/list',
        method: 'get'
    })
}

export function file_group_del(attachFileGroupId) {
    return request({
        url: '/mall_biz/attach_file_group',
        method: 'delete',
        params: { attachFileGroupId }
    })
}